Util.addStyle(`
#bilibiliChannelViewer{
background:rgb(20,22,23);
top:0;
    margin: 0px;
    height: auto;
    width: 100%;
    max-height: 100%;
    position: fixed;
    z-index: 2023;
    overflow-y: auto;
    border: 3px solid green;
}

#bilibiliChannelViewer button{
    margin-top: 10px;
    padding: 5px 10px;
    border: none;
    background-color: #4CAF50;
    color: #fff;
    cursor: pointer;
}
#bilibiliChannelViewer button:hover {
    background-color: #3E8E41;
}
/* 隐藏标签布局，除了“active”的标签布局 */
#bilibiliChannelViewer .tab {
    display: none;
}
#bilibiliChannelViewer .tab.active {
    display: block;
}



`);
Layout.addLayout();
HomePageLayoutVue.returnVue();
DonateLayoutVue.returnVue();
FooterVue.returnVue();
try {
    bilibliOne(Util.getWindowUrl());
} catch (e) {
    console.error(e);
}

function openTab(e) {// 点击标签时执行此函数
    const tabs = document.querySelectorAll("#bilibiliChannelViewer .tab");
    for (let v of tabs) {
        v.classList.remove("active");
    }
    const tempE = document.querySelector(`#bilibiliChannelViewer #${e}`);
    tempE.classList.add("active");
}

$("#tabUl>li>button").click((e) => {
    const domElement = e.delegateTarget;
    document.querySelectorAll("#tabUl>li>button").forEach((value, key, parent) => {
        $(value).css("color", "");
    })
    domElement.style.color = "#1b00ff";
    openTab(domElement.value);
});
